<extend name="Base/base" />
<block name="button">
	
	<button class="btn btn-primary" type="submit" form="form"><i class="fa fa-save"></i> {:L('text_save')}</button>
</block>
<block name="body">
	<if condition="$msg">
		<div class="alert alert-danger alert-dismissible fade in" role="alert">
		      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
		      {$msg.warning}

		    </div>
	</if>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h4><i class="fa fa-pencil fa-fw"></i>  {$heading_title}</h4>
		</div>
		<div class="panel-body">
			<form action="" method="post" id="form" class="form-horizontal">
				<div class="form-group required">
					<label for="input-name" class="col-sm-2 control-label">{:L('entry_name')}</label>
					<div class="col-sm-10">
						<input type="text" value="{$html.name|default=''}" placeholder="{:L('entry_name')}" name="name" class="form-control" id="input-name">
						<if condition="isset($msg['name'])">
						{:danger_msg($msg['name'])}
						</if>
					</div>
						
				</div>
				<div class="form-group">
					<label for="input-status" class="control-label col-sm-2">{:L('text_status')}</label>
					<div class="col-sm-10">
						<select name="status" id="input-status" class="form-control">
							<option value="1">{:L('text_enabled')}</option>
							<option <if condition="isset($html['status']) && ($html['status'] eq 0)">selected</if> value="0">{:L('text_disabled')}</option>						
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="input-link" class="col-sm-2 control-label">{:L('entry_link')}</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" id="input-link" placeholder="{:L('entry_link')}" name="link" value="{$html.link}">
					</div>
				</div>
				<div class="tab-pane">
					<ul class="nav nav-tabs">
						<foreach name="languages" key="key" item="language">
							<li class="{$key?'':'active'}">
								<a href="#language{$language.language_id}" data-toggle="tab"><img src="__PUBLIC__/Images/flags/{$language.image}">  {$language.name}</a>
							</li>
						</foreach>
					</ul>
					<div class="tab-content">
							<foreach name="languages" key="key" item="language">
								<div class="tab-pane {$key?'':'active'}" id="language{$language.language_id}">
									<div class="form-group">
										<label for="input-title{$language.language_id}" class="col-sm-2 control-label">{:L('entry_title')}</label>
										<div class="col-sm-10">
											<input type="text" name="module_description[{$language.language_id}][title]" value="{$html['module_description'][$language['language_id']]['title']|default=''}" placeholder="{:L('entry_title')}" id="iput-title{$language.language_id}" class="form-control">
										</div>
									</div>
									<div class="form-group">
										<label for="input-content{$language.language_id}" class="col-sm-2 control-label">{:L('entry_content')}</label>
										<div class="col-sm-10">
											<textarea name="module_description[{$language.language_id}][content]" id="input-content{$language.language_id}" class="form-control summernote" placeholder="{:L('entry_content')}">{$html['module_description'][$language['language_id']]['content']|default=''}</textarea>
										</div>
									</div>									
								</div>
							</foreach>
						</div>
				</div>
			</form>
		</div>
	</div>
</block>
